add single-argument (de)serialize methods operating on vectors of bytes#60315
add single-argument (de)serialize methods operating on vectors of bytes#60315aplavin wants to merge 3 commits intoJuliaLang:masterfrom
Conversation
|
Looks good. Would be nice to add doc strings to these. |
LilithHafner
left a comment
There was a problem hiding this comment.
LGTM. I've also wanted this functionality. There's no other plausible implementation of the deserialize(::Vector{UInt8}) method, and the return type Vector{UInt8} seems reasonable for the serialize(value) method.
Should go to triage as it is technically an expansion of public API? The specific question I'd ask is: "Is Vector{UInt8} the right return type for serialize(value)?"
|
I think we can just merge this. What is the mac build failure here about? |
|
is there a reason the docs enforce specifically a for |
|
|
||
| See [`deserialize(::IO)`](@ref deserialize(::IO)) for more details and caveats. | ||
|
|
||
| !!! compat "Julia 1.13" |
There was a problem hiding this comment.
| !!! compat "Julia 1.13" | |
| !!! compat "Julia 1.14" |
| See [`deserialize(::IO)`](@ref deserialize(::IO)) for more details and caveats. | ||
|
|
||
| !!! compat "Julia 1.13" | ||
| This method is available as of Julia 1.13. |
There was a problem hiding this comment.
| This method is available as of Julia 1.13. | |
| This method is available as of Julia 1.14. |
|
@aplavin Can you update the compat notes to 1.14, as suggested by @adienes? Also, can you rebase on the latest Julia master? Once the above two tasks are done, and once CI is green, @JeffBezanson @LilithHafner can I merge this? |
|
I think triage should talk briefly about API just to confirm. e.g. we should talk about #60315 (comment) |
|
From triage: we think it's fine to use |
Basically, for convenience: I find myself copy-pasting these methods whenever I load/store Julia serialized data as part of another data format like parquet or sql database. They natively store byte arrays, and would be nice to have these (de)serialize methods going directly back and forth between Julia objects and byte vectors.
Another neat usecase is to quickly copy-paste a Julia object between different Julia sessions (repls, notebooks, remote, ...):